package xyz.imeans.w.client;

import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Put;
import com.xiaoleilu.hutool.json.JSONObject;

public interface EsClient {

    @Post(url = "{0}/{1}/_bulk", contentType = "application/json")
    Object bulk(String host, String api, @Body String data);

    @Get(url = "{0}/{1}/_mapping", contentType = "application/json")
    JSONObject getMapping(String host, String api);

    @Put(url = "{0}/{1}", contentType = "application/json")
    JSONObject mapping(String host, String api, @Body String data);

}
